package com.navi.loaddata.core.gpEntity;

import javax.persistence.Column;
import javax.persistence.Id;
import java.io.Serializable;
import java.sql.Timestamp;

/**
 * Created by fw_06 on 2018/1/17.
 */
public class WppCunitHisPK implements Serializable {
    private String glassId;
    private String opeId;
    private String shopId;
    private String eqptId;
    private String subEqptId;
    private String unitEqptId;
    private Timestamp outTimestamp;

    @Column(name = "glass_id")
    @Id
    public String getGlassId() {
        return glassId;
    }

    public void setGlassId(String glassId) {
        this.glassId = glassId;
    }

    @Column(name = "ope_id")
    @Id
    public String getOpeId() {
        return opeId;
    }

    public void setOpeId(String opeId) {
        this.opeId = opeId;
    }

    @Column(name = "shop_id")
    @Id
    public String getShopId() {
        return shopId;
    }

    public void setShopId(String shopId) {
        this.shopId = shopId;
    }

    @Column(name = "eqpt_id")
    @Id
    public String getEqptId() {
        return eqptId;
    }

    public void setEqptId(String eqptId) {
        this.eqptId = eqptId;
    }

    @Column(name = "sub_eqpt_id")
    @Id
    public String getSubEqptId() {
        return subEqptId;
    }

    public void setSubEqptId(String subEqptId) {
        this.subEqptId = subEqptId;
    }

    @Column(name = "unit_eqpt_id")
    @Id
    public String getUnitEqptId() {
        return unitEqptId;
    }

    public void setUnitEqptId(String unitEqptId) {
        this.unitEqptId = unitEqptId;
    }

    @Column(name = "out_timestamp")
    @Id
    public Timestamp getOutTimestamp() {
        return outTimestamp;
    }

    public void setOutTimestamp(Timestamp outTimestamp) {
        this.outTimestamp = outTimestamp;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        WppCunitHisPK that = (WppCunitHisPK) o;

        if (glassId != null ? !glassId.equals(that.glassId) : that.glassId != null) return false;
        if (opeId != null ? !opeId.equals(that.opeId) : that.opeId != null) return false;
        if (shopId != null ? !shopId.equals(that.shopId) : that.shopId != null) return false;
        if (eqptId != null ? !eqptId.equals(that.eqptId) : that.eqptId != null) return false;
        if (subEqptId != null ? !subEqptId.equals(that.subEqptId) : that.subEqptId != null) return false;
        if (unitEqptId != null ? !unitEqptId.equals(that.unitEqptId) : that.unitEqptId != null) return false;
        if (outTimestamp != null ? !outTimestamp.equals(that.outTimestamp) : that.outTimestamp != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = glassId != null ? glassId.hashCode() : 0;
        result = 31 * result + (opeId != null ? opeId.hashCode() : 0);
        result = 31 * result + (shopId != null ? shopId.hashCode() : 0);
        result = 31 * result + (eqptId != null ? eqptId.hashCode() : 0);
        result = 31 * result + (subEqptId != null ? subEqptId.hashCode() : 0);
        result = 31 * result + (unitEqptId != null ? unitEqptId.hashCode() : 0);
        result = 31 * result + (outTimestamp != null ? outTimestamp.hashCode() : 0);
        return result;
    }
}
